<script>
  import School from "./components/School.vue";

  export default {
    name: "App",
    data() {
      return {
        msg: "Hello World!"
      }
    },
    methods: {
      showDOM() {
        // console.log(document.getElementById("h1_dom"));
        console.log("Hello World !", this.$refs.h1_dom)
        console.log("Hello World ! button:", this.$refs.btn)
        console.log("School ref:", this.$refs.school)
      }
    },
    components: {School}
  }
</script>

<template>
  <div>
    <h1 v-text="msg" ref="h1_dom"></h1>
    <button ref="btn" @click="showDOM">点我输出上方DOM元素</button>
    <School ref="school"></School>
  </div>
</template>

<style scoped>

</style>